home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / musictex / older-versions / musictex.500 / MUSICGEN.MF < prev    next >
Text File  |  1992-06-08  |  41KB  |  1,373 lines

  1. apog_fact=0.75;
  2. apog_nhh=apog_fact*nhh;
  3. apog_nhh#=apog_fact*nhh#;
  4. %
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %       NOTENKOEPFE UND FAEHNCHEN                             %
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. %
  9. %%%%%%%%%%%%%%%
  10. %%notenkoepfe %
  11. %%%%%%%%%%%%%%%
  12.  
  13. def drawnoteb(expr noteheadwidth, noteheadheight, theta_a, theta_b, theta_c,
  14. width_a, width_b)  =
  15.                                             %         .l
  16.             penpos1(width_a, theta_a);      %         .2
  17.                                             %         .r
  18.             penpos3(width_a, 180+theta_a);  %.l.1.r            .r.3.l
  19.                                             %         .r
  20.             penpos2(width_b, 180+theta_b);  %         .4
  21.                                             %         .l
  22.             penpos4(width_b, theta_b);    %
  23.             y1 = y3 = 0;
  24.             x2 = x4 = 1/2noteheadwidth;
  25.             x1l= 0; x3l = noteheadwidth; y2l = noteheadheight; y4l = -noteheadheight;
  26.             penstroke (z1e{up}..z2e{right}..z3e{down}..z4e{left}..cycle)
  27.             rotatedaround((origin +1/2noteheadwidth*right),theta_c);
  28.             enddef;
  29.  
  30. def drawnotew(expr noteheadwidth, noteheadheight, theta_a, theta_b, 
  31. width_a, width_b)  =
  32.                                             %         .l
  33.             penpos1(width_a, theta_a);      %         .2
  34.                                             %         .r
  35.             penpos3(width_a, 180+theta_a);  %.l.1.r            .r.3.l
  36.                                             %         .r
  37.             penpos2(width_b, 180+theta_b);  %         .4
  38.                                             %         .l
  39.             penpos4(width_b, theta_b);      %
  40.             y1l = y3l = 0;
  41.             x2l = x4l = 0.5noteheadwidth;
  42.             x1l= 0; x3l = noteheadwidth;
  43.             y2l = noteheadheight; y4l = -noteheadheight;
  44. %%%%        penstroke (z1e{up}..z2e{right}..z3e{down}..z4e{left}..cycle);
  45. %%%%        pickup pencircle xscaled width_a yscaled width_b;
  46. %%%%        draw (z1{up}..z2{right}..z3{down}..z4{left}..cycle);
  47.             fill (z1l{up}..z2l{right}..z3l{down}..z4l{left}..cycle); cullit;
  48.             unfill (z1r{up}..z2r{right}..z3r{down}..z4r{left}..cycle); cullit;
  49.             penlabels(1,2,3,4);
  50.             enddef;
  51. %%%%%%%%%%%%%%%
  52. %    flags    %
  53. %%%%%%%%%%%%%%%
  54. %
  55. %
  56. pickup pencircle scaled (0.1pt);
  57. def penstrike text t =
  58.  forsuffixes e = l,r: path_.e:=t; endfor
  59.  if cycle path_.l: cyclestroke_
  60.  else: filldraw path_.l -- reverse path_.r -- cycle fi enddef;
  61. %
  62. %      
  63. def flagshape(suffix i) (expr width, height, thick, thin, shiftx, shifty,
  64.            flagsense) =
  65.            pair intersectionp;                             %
  66. %                                                          %  .1
  67.            penpos[i](thick,90);                            %
  68.            penpos[i+1](3thin,45);                          %       .2
  69.            penpos[i+2](thin,0);                            %
  70.            penpos[i+3](thin,0);                            %           .3
  71.            x[i] =  shiftx-0.2pt;                           %
  72.            y[i]r =  height+shifty;                         %        .4
  73.            x[i+1] = shiftx+3/8width;                       %
  74.            y[i+1] = height+shifty - thick;                 %
  75.            x[i+2]r = shiftx+width;
  76.            y[i+2]r = height+shifty - 2thick;
  77.            y[i+3] = shifty;
  78.            x[i+3]r = shiftx+0.6width;
  79.            if i>1: intersectionp = z[i-2];
  80.            else  : intersectionp = z[i+3];
  81.            fi;
  82.            
  83.            if flagsense>0: penstrike
  84.              (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  85.              ..z[i+1]e{z[i+1]e-z[i]e}
  86.              ..z[i+2]e{down}..intersectionp);
  87.            else:
  88.              penstrike (counterclockwise
  89.              (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  90.              ..z[i+1]e{z[i+1]e-z[i]e}
  91.              ..z[i+2]e{down}..intersectionp)
  92.              reflectedabout ((0,h/2), (nhw,h/2))) ;
  93.            fi;
  94.  
  95. enddef;
  96. %%%%%%%%%%%%%%%%%%%%%%
  97. % song system limits %
  98. %%%%%%%%%%%%%%%%%%%%%%
  99. beginchar(14,0.5nhw#,0,0);
  100.      clear;
  101.      z1=(0,0);
  102.      z2=(0.5nhw,0);
  103.      z3=(1.5nhw,nhh);
  104.      penpos1(0.4pt,90);
  105.      penpos2(0.4pt,90);
  106.      penpos3(0.2pt,135);
  107.      penstroke (z1e--z2e{right+0.2up}..z3e);
  108. endchar;
  109. beginchar(15,0.5nhw#,0,0);
  110.      clear;
  111.      z1=(0,0);
  112.      z2=(0.5nhw,0);
  113.      z3=(1.5nhw,-nhh);
  114.      penpos1(0.4pt,90);
  115.      penpos2(0.4pt,90);
  116.      penpos3(0.2pt,45);
  117.      penstroke (z1e--z2e{right-0.2up}..z3e);
  118. endchar;
  119.  
  120. %%%%%%%%%%%%%%%%
  121. % 4 crescendos %
  122. %%%%%%%%%%%%%%%%
  123. for n:=1 upto 4:
  124.   beginchar(15+n, 4*n*nhw#, (0.5+0.1*n)*nhh#, (0.5+0.1*n)*nhh#);
  125.     pickup pencircle scaled (0.4s);
  126.     draw   (0,(0.5+0.1*n)*nhh)--(4*n*nhw,0)--(0,-(0.5+0.1*n)*nhh);
  127.   endchar;
  128. endfor;
  129. %%%%%%%%%%%%%%%%%%
  130. % 4 decrescendos %
  131. %%%%%%%%%%%%%%%%%%
  132. for n:=1 upto 4:
  133.   beginchar(19+n, 4*n*nhw#, (0.5+0.1*n)*nhh#, (0.5+0.1*n)*nhh#);
  134.     pickup pencircle scaled (0.4s);
  135.     draw   (4*n*nhw,(0.5+0.1*n)*nhh)--(0,0)--(4*n*nhw,-(0.5+0.1*n)*nhh);
  136.   endchar;
  137. endfor;
  138. %%%%%%%%%%%%%%%
  139. %   accents   %
  140. %%%%%%%%%%%%%%%
  141. % point au-dessus de la note
  142. beginchar(24, nhw#, 1.0nhh#, 0.0nhh#);
  143.   clear;
  144.   pickup pencircle scaled 0.25nhh;
  145.   drawdot (0.5nhw, 0.2pt+1.15nhh);
  146. endchar;
  147. % point au-dessous de la note
  148. beginchar(25, nhw#, 0.0nhh#, 1.0nhh#);
  149.   clear;
  150.   pickup pencircle scaled 0.25nhh;
  151.   drawdot (0.5nhw, -0.2pt-1.15nhh);
  152. endchar;
  153. % barre au-dessus de la note
  154. beginchar(26, nhw#, 1.0nhh#, 0.0nhh#);
  155.   clear;
  156.   dely:=0.2pt+1.15nhh;
  157.   pickup penrazor scaled 0.15nhh rotated 90;
  158.   draw (0.0nhw, dely)--(1.0nhw, dely);
  159. endchar;
  160. % trait au-dessous de la note
  161. beginchar(27, nhw#, 0.0nhh#, 1.0nhh#);
  162.   clear;
  163.   dely:=0.2pt+1.15nhh;
  164.   pickup penrazor scaled 0.15nhh rotated 90;
  165.   draw (0.0nhw, -dely)--(1.0nhw, -dely);
  166. endchar;
  167. % accent (pizz.) au-dessus de la note
  168. beginchar(28, nhw#, 1.0nhh#, 0.0nhh#);
  169.   clear;
  170.   dely:=1.2nhh;
  171.   rayon:=0.2nhh;
  172.   z1=(0.5nhw,dely+rayon);
  173.   z2=(0.5nhw-rayon,dely);
  174.   z3=(0.5nhw,dely-0.45nhh);
  175.   z4=(0.5nhw+rayon,dely);
  176.   fill z1{left}..{down}z2--z3--z4{up}..{left}cycle;
  177. endchar;
  178. % accent (pizz.) au-dessous de la note
  179. beginchar(29, nhw#, 0.0nhh#, 1.0nhh#);
  180.   clear;
  181.   rayon:=0.2nhh;
  182.   dely:=1.2nhh;
  183.   z1=(0.5nhw,dely+rayon);
  184.   z2=(0.5nhw-rayon,dely);
  185.   z3=(0.5nhw,dely-0.45nhh);
  186.   z4=(0.5nhw+rayon,dely);
  187.   fill (z1{left}..{down}z2--z3--z4{up}..{left}cycle) 
  188.               rotatedaround ((0.5nhw,0),180);
  189. endchar;
  190. % accent (sforz.) au-dessus de la note
  191. beginchar(30, nhw#, 1.5nhh#, 0.0nhh#);
  192.   clear;
  193.   z1=(1.2nhw,1.3nhh);
  194.   z2=(-0.2nhw,1.3nhh);
  195.   pickup pencircle scaled 0.5s;
  196.   draw z1--(x2,y2+0.3nhh);
  197.   draw z1--(x2,y2-0.3nhh);
  198. endchar;
  199. % accent (sforz.) au-dessous de la note
  200. beginchar(31, nhw#, 0.0nhh#, 1.0nhh#);
  201.   clear;
  202.   z1=(1.2nhw,-1.3nhh);
  203.   z2=(-0.2nhw,-1.3nhh);
  204.   pickup pencircle scaled 0.5s;
  205.   draw z1--(x2,y2+0.3nhh);
  206.   draw z1--(x2,y2-0.3nhh);
  207. endchar;
  208. %%%%%%%%%%%%%%%
  209. %   breve     %
  210. %%%%%%%%%%%%%%%
  211. beginchar(32, nhw#, 0.7nhh#, 0.7nhh#);
  212.   clear;
  213.   pickup pencircle scaled (4thinwidth);
  214.   draw (0,h)--(0,-d);
  215.   draw (w,h)--(w,-d);
  216.   fill (0,0.75h)--(w,0.75h)--(w,0.25h)--(0,0.25h)--cycle;
  217.   fill (0,-0.75d)--(w,-0.75d)--(w,-0.25d)--(0,-0.25d)--cycle;
  218. endchar;
  219. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  220. % volle Note -- quarter note -- noire %
  221. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  222. beginchar(33, nhw#, .5nhh#, .5nhh#);
  223.           w:=w+2thinwidth;
  224.           drawnoteb(w, h, 0, 90, 20, w/2, nhh/2);
  225. endchar;
  226. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  227. %% halbe Note -- half note -- blanche %
  228. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  229. beginchar(34, nhw#, .5nhh#, .5nhh#);
  230.           w:=w+2thinwidth;
  231.           drawnoteb(w, h, 0, 90, 20, 3*thinwidth, nhh/4);
  232. endchar;
  233. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  234. % ganze Note -- whole note -- ronde %
  235. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  236. beginchar(35,1.5nhh#, .5nhh#, .5nhh#);
  237.           drawnotew(w, h, 0, 30, nhh/3, 3.5*thinwidth);
  238. endchar;
  239. %%%%%%%%%%%%%%%
  240. % semi-breve  %
  241. %%%%%%%%%%%%%%%
  242. beginchar(36, 2nhw#, 0.7nhh#, 0.7nhh#);
  243.   clear;
  244.   pickup pencircle scaled (4thinwidth);
  245.   draw (0,h)--(0,-d);
  246.   draw (w,h)--(w,-d);
  247.   fill (0,0.75h)--(w,0.75h)--(w,0.25h)--(0,0.25h)--cycle;
  248.   fill (0,-0.75d)--(w,-0.75d)--(w,-0.25d)--(0,-0.25d)--cycle;
  249. endchar;
  250. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  251. %% volle kleine Note -- small quarter note %
  252. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  253. beginchar(37, apog_fact*nhw#, .50*apog_nhh#, .50*apog_nhh#);
  254.           w:=apog_fact*nhw;
  255.           w:=w+2thinwidth;
  256.           drawnoteb(w, h, 0, 90, 20, w/2, apog_nhh/2);
  257. endchar;
  258. %%%%%%%%%%%%%%%
  259. %% halbe Note %
  260. %%%%%%%%%%%%%%%
  261. beginchar(38, apog_fact*nhw#, apog_fact*0.5nhh#, apog_fact*0.5nhh#);
  262.           w:=w+2thinwidth;
  263.           drawnoteb(w, h, 0, 90, 20, 3*thinwidth, apog_nhh/4);
  264. endchar;
  265. %%%%%%%%%%%%%%%
  266. %% ganze Note %
  267. %%%%%%%%%%%%%%%
  268. beginchar(39, 1.5*apog_nhh#, apog_fact*0.5nhh#, apog_fact*0.5nhh#);
  269.           drawnotew(w, h, 0, 30, apog_nhh/3, 3.5*thinwidth*apog_fact);
  270. endchar;
  271. %
  272. % general parameters for flags
  273. %
  274.     flagw:=0.8*nhw;
  275.     flagthick:=nhh;
  276.     flagthin:=5thinwidth;
  277. %
  278.     def cflag (expr sense) =
  279.           pickup pencircle scaled (0.1pt);
  280.           flagshape(1, flagw, h, flagthick, flagthin, 0, 0, sense);
  281.     enddef;
  282.     def ccflag (expr sense) =
  283.           pickup pencircle scaled (0.1pt);
  284.           flagshape(1, flagw, 2.50flagthick, 2/3flagthick, flagthin,
  285.              0, 0, sense);
  286.           flagshape(5, flagw, 2.25flagthick, 2/3flagthick, flagthin,
  287.              0, flagthick, sense);
  288.     enddef;
  289.     def cccflag (expr sense) =
  290.           ccflag(sense);
  291.           flagshape(9, flagw, 2.25flagthick, 2/3flagthick, flagthin,
  292.              0, 1.75flagthick, sense);
  293.     enddef;
  294.     def ccccflag (expr sense) =
  295.           cccflag(sense);
  296.           flagshape(13, flagw, 2.25flagthick, 2/3flagthick, flagthin,
  297.              0, 2.50flagthick, sense);
  298.     enddef;
  299.     def cccccflag (expr sense) =
  300.           ccccflag(sense);
  301.           flagshape(17, flagw, 2.25flagthick, 2/3flagthick, flagthin,
  302.              0, 3.25flagthick, sense);
  303.     enddef;
  304. %%%%%%%%%%%%%%%%%%%%%%
  305. % "8flag nach unten" %
  306. %%%%%%%%%%%%%%%%%%%%%%
  307. flagw:=0.8*nhw;
  308. beginchar(40, 0, 3nhh#, 0);
  309.           clear;
  310.           cflag(1);
  311.           w:=0;
  312. endchar;
  313. % idem mais avec barre (appogiature)
  314. beginchar(12, 0, 3nhh#, 0);
  315.           clear;
  316.           cflag(1);
  317.           pickup pencircle scaled 4thinwidth;
  318.           clear;
  319.           w:=nhw;
  320.           x1=-0.25w; y1=0.6nhh; x2=1.1w; y2=y1+0.6*(x2-x1);
  321.           draw z1--z2;
  322.           w:=0;
  323. endchar;
  324. %%%%%%%%%%%%%%%%%%%%%%%%
  325. %% "16flag nach unten" %
  326. %%%%%%%%%%%%%%%%%%%%%%%%
  327. beginchar(41, 0, 3.25nhh#, 0);
  328.           clear;
  329.           ccflag(1);
  330.           w:=0;
  331. endchar;
  332. %%%%%%%%%%%%%%%%%%%%%%%%
  333. %% "32flag nach unten" %
  334. %%%%%%%%%%%%%%%%%%%%%%%%
  335. beginchar(42, 0, 4.00nhh#, 0);
  336.           clear;
  337.           cccflag(1);
  338.           w:=0;
  339. endchar;
  340. %%%%%%%%%%%%%%%%%%%%%%%%
  341. %% "64flag nach unten" %
  342. %%%%%%%%%%%%%%%%%%%%%%%%
  343. beginchar(43, 0, 4.75nhh#, 0);
  344.           clear;
  345.           ccccflag(1);
  346.           w:=0;
  347. endchar;
  348. %%%%%%%%%%%%%%%%%%%%%%%%%
  349. %% "128flag nach unten" %
  350. %%%%%%%%%%%%%%%%%%%%%%%%%
  351. beginchar(44, 0, 5.50nhh#, 0);
  352.           clear;
  353.           cccccflag(1);
  354.           w:=0;
  355. endchar;
  356. flagw:=1.0*nhw;   % flags up should be wider
  357. %%%%%%%%%%%%%%%%%%%%%%
  358. %% "8flag nach oben" %
  359. %%%%%%%%%%%%%%%%%%%%%%
  360. beginchar(45, 0, 3nhh#, 0);
  361.          clear;
  362.          cflag(-1);
  363.          w:=0;
  364. endchar;
  365. % idem mais avec barre (appogiature)
  366. beginchar(13, 0, 3nhh#, 0);
  367.           clear;
  368.           cflag(-1);
  369.           pickup pencircle scaled 4thinwidth;
  370.           clear;
  371.           w:=nhw;
  372.           x1=-0.25w; y1=1.6nhh; x2=1.2w; y2=y1+0.6*(x2-x1);
  373.           draw z1--z2;
  374.           w:=0;
  375. endchar;
  376. %%%%%%%%%%%%%%%%%%%%%%%
  377. %% "16flag nach oben" %
  378. %%%%%%%%%%%%%%%%%%%%%%%
  379. beginchar(46, 0, 3.25nhh#, 0);
  380.           clear;
  381.           ccflag(-1);
  382.           w:=0;
  383. endchar;
  384. %%%%%%%%%%%%%%%%%%%%%%%
  385. %% "32flag nach oben" %
  386. %%%%%%%%%%%%%%%%%%%%%%%
  387. beginchar(47, 0, 4.00nhh#, 0);
  388.           clear;
  389.           cccflag(-1);
  390.           w := 0;
  391. endchar;
  392. %%%%%%%%%%%%%%%%%%%%%%%
  393. %% "64flag nach oben" %
  394. %%%%%%%%%%%%%%%%%%%%%%%
  395. beginchar(48, 0, 4.75nhh#, 0);
  396.           clear;
  397.           ccccflag(-1);
  398.           w := 0;
  399. endchar;
  400. %%%%%%%%%%%%%%%%%%%%%%%%
  401. %% "128flag nach oben" %
  402. %%%%%%%%%%%%%%%%%%%%%%%%
  403. beginchar(49, 0, 5.50nhh#, 0);
  404.           clear;
  405.           cccccflag(-1);
  406.           w := 0;
  407. endchar;
  408. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  409. %                                                            %
  410. %                VERSETZUNGSZEICHEN                          %
  411. %                                                            %
  412. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  413. %%%%%%%%%%%%
  414. %  "flat"  %
  415. %%%%%%%%%%%%
  416. def flat (expr reduction,shiftx,flatsense) =
  417.          clear; flatraise:=0;   %
  418.          penpos4(8/24reduction*nhh,0);%/5,20             % 1
  419.          penpos3(reduction*nhh/8,-90);%/5,20             %
  420.          penpos6(reduction*nhh/7, 90);%/5,20             %
  421.          penpos2(reduction*nhh/8, 90);%/5,20             %   6 \
  422.          y1 =  1.5*reduction*nhh+flatraise;              %  /    4
  423.          x1=x2=x5 = reduction*s; x4 = reduction*(nhw-s); % 2    /
  424.          y4 = 0.1reduction*s+flatraise;                  %    /
  425.          y3l =  flatraise-0.5*reduction*nhh;             %35
  426.          y2l = 0.5y4; y5=y3;
  427.          x3=x5-1.5thinwidth;
  428.          y6r=0.5*reduction*nhh+flatraise; x6=(x2+x4)/2;
  429.          currentpen:= pencircle scaled 3thinwidth;
  430.          if flatsense>0:
  431.            penstroke
  432.               (z2e..{right}z6e{right}..{down}z4e{down}..{left+down}z3e)
  433.                        shifted (shiftx,flatraise);
  434.            cullit;
  435.            draw (z1--z5) shifted (shiftx,flatraise); 
  436.            penlabels (1,2,3,4,5);
  437.          else:
  438.            penstroke   (counterclockwise (
  439.               (z2e..{right}z6e{right}..{down}z4e{down}..{3left+2down}z3e)
  440.                        reflectedabout(z1,z5)))
  441.                        shifted (shiftx,flatraise);
  442.            cullit;
  443.            draw (z1--z5) shifted (shiftx,flatraise); 
  444.          fi;  cullit;
  445. enddef;
  446. %
  447. beginchar(50, nhw#, 2nhh#, 2nhh#);
  448.  flat (1.0, 0, 1);
  449. endchar;
  450. %
  451. %%%%%%%%%%
  452. %% "bb"  %
  453. %%%%%%%%%%
  454. beginchar(51,1.7nhw#, 2nhh#, 2nhh#);
  455.          flat (1.0, 0, 1); cullit; clear;
  456.          flat (1.0, 0.7nhw, 1);
  457. endchar;
  458. %%%%%%%%%%%%%
  459. %  "sharp"  %
  460. %%%%%%%%%%%%%
  461. def sharp ( expr reduction ) =
  462.          clear;
  463.          penpos3(3/8reduction*nhh,90);
  464.          penpos4(3/8reduction*nhh,90);
  465.          penpos5(3/8reduction*nhh,90);
  466.          penpos6(3/8reduction*nhh,90);
  467.          y1 + y2 = -0.5reduction*s; y1 - y2 = 2h - reduction*s;
  468.          x1 = x2 =  reduction*s; y3 = 1/4reduction*nhh;
  469.          y4l = y3r; x3= 0; x4 = 0.8*reduction*nhw;
  470.          y5 = -y4; y6 = -y3; x5 = x3; x6 = x4;
  471.          x7 = w-x1 ; x8 = w-x2; y7=-y1; y8=-y2;
  472.          currentpen:=  pencircle scaled 3thinwidth;
  473.          draw z1--z2;
  474.          draw z7--z8;
  475.          penstroke  z3e--z4e;
  476.          penstroke (z5e--z6e) ;
  477.          penlabels(1,2,3,4,5,6,7,8);
  478. enddef;
  479. %
  480. beginchar(52, 0.8nhw#, 1.5nhh#, 1.5nhh#);
  481.   sharp(1.0);
  482. endchar;
  483. %
  484. %%%%%%%%%%
  485. %% "xx"  %
  486. %%%%%%%%%%%
  487. beginchar(53, nhw#, .5nhw#, .5nhw#);
  488.          clear;
  489.          z1 = (0.150w, h-0.150w); z2 = (w-0.150w, h-0.150w);
  490.          z3 = (0.150w,-h+0.150w); z4 = (w-0.150w,-h+0.150w);
  491.          currentpen:= pencircle scaled .2nhh;
  492.          draw z1--z4; draw z3--z2;
  493.          currentpen:= pensquare scaled .30w;
  494.          drawdot z1; drawdot z2; drawdot z3; drawdot z4;
  495. endchar;
  496. %%%%%%%%%%%%%%%
  497. % "natural"  %
  498. %%%%%%%%%%%%%%%
  499. def natural =
  500.          clear;
  501.          reduction:=w/(0.8*nhw);
  502.          penpos3(3/8reduction*nhh,90);
  503.          penpos4(3/8reduction*nhh,90);
  504.          penpos7(3/8reduction*nhh,90);
  505.          penpos8(3/8reduction*nhh,90);
  506.          x1 = x2 = x3 = x7 = 0.75*reduction*s-1.5thinwidth;
  507.          x5 = x6 = x4 = x8 = w-x1;
  508.          y1 =  h;  y3 =  0.30reduction*nhh ;
  509.          y4l = y3r-0.5*reduction*s ;
  510.          y6 = -y1; y5 = -y2;
  511.          y7l = y2;
  512.          y7 = -y4; y8 = -y3;
  513.          currentpen:= pencircle scaled 3thinwidth;
  514.          draw (z1--(x2,y2+1.5thinwidth)) shifted (1.5thinwidth,0);
  515.          draw ((x5,y5-1.5thinwidth)--z6) shifted (-1.5thinwidth,0);
  516.          penstroke  z3e--z4e;
  517.          penstroke  z7e--z8e;
  518.          penlabels(1,2,3,4,5,6,7,8);
  519. enddef;
  520. %
  521. beginchar(54, 0.8nhw#, 1.5nhh#, 1.5nhh#);
  522.   natural;
  523. endchar;
  524. %
  525. %%%%%%%%%%%%%%%%
  526. %% "1/4 flat"  %
  527. %%%%%%%%%%%%%%%%
  528. beginchar(55, nhw#, 2nhh#, 2nhh#);
  529.          flat (1.0, 0.65nhw,-1);
  530. endchar;
  531. %%%%%%%%%%%%%%%%
  532. %% "3/4 flat"  %
  533. %%%%%%%%%%%%%%%%
  534. beginchar(56, 1.7nhw#, 2nhh#, 2nhh#);
  535.          flat (1.0, 0.65nhw, -1); clear; cullit;
  536.          flat (1.0, 0.65nhw, 1);
  537. endchar;
  538. %
  539. % Gregorian notes
  540. %
  541. beginchar(57, nhw#, .5nhh#, .5nhh#);
  542.   fill (0.5w-0.8h,0)--(0.5w,h)--(0.5w+0.8h,0)--(0.5w,-h)--cycle;
  543. endchar;
  544. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  545. %                                                             %
  546. %                      PAUSEN                                 %
  547. %                                                             %
  548. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  549. %%%%%%%%%
  550. %% "dp" %
  551. %%%%%%%%%
  552. beginchar(58,1/2nhw#, 3nhh#, 0);
  553.          clear;
  554.          penpos1(nhh,90);
  555.          penpos2(nhh,90);
  556.          y1r = y2r = h;
  557.          x1r =  0; x2r = w;
  558.          currentpen:= pencircle;
  559.          penstroke z1e--z2e;
  560. labels(1,2);
  561. endchar;
  562. %%%%%%%%%%
  563. %% "ddp" %
  564. %%%%%%%%%%
  565. beginchar(59,1/2nhw#, 3nhh#, 0);
  566.          clear;
  567.          penpos1(2nhh,90);
  568.          penpos2(2nhh,90);
  569.          y1r = y2r = h;
  570.          x1r =  0; x2r = w;
  571.          currentpen:= pencircle;
  572.          penstroke z1e--z2e;
  573. labels(1,2);
  574. endchar;
  575. %%%%%%%%%%%%%%%%%%
  576. %% "ganze Pause" %
  577. %%%%%%%%%%%%%%%%%%
  578. beginchar(60, nhw#, 3nhh#, 0);
  579.          clear;
  580.          penpos1(nhh/2,90);
  581.          penpos2(nhh/2,90);
  582.          y1r = y2r = h;
  583.          x1r =  0; x2r = w;
  584.          currentpen:= pencircle;
  585.          penstroke z1e--z2e;
  586. endchar;
  587. %
  588. %%%%%%%%%%%%%%%%%%
  589. %% "halbe Pause" %
  590. %%%%%%%%%%%%%%%%%%
  591. beginchar(61, nhw#, 2.5nhh#, 0);
  592.          clear;
  593.          penpos1(nhh/2,90);
  594.          penpos2(nhh/2,90);
  595.          y1r = y2r = h;
  596.          x1r =  0; x2r = w;
  597.          currentpen:= pencircle;
  598.          penstroke z1e--z2e;
  599. endchar;
  600. %%%%%%%%%%%%%%%%%%%%
  601. %% "viertel Pause" %
  602. %%%%%%%%%%%%%%%%%%%%
  603. beginchar(62, nhw#, 4nhh#, 0);                             % .1
  604.          clear;                                            %         .2
  605.          thin := 1/8 nhh; thick := 1/2 nhh;                %     8..3
  606.          alpha_a = -50; alpha_b = -50;                     %   .4
  607.          penpos1 ( thin, (alpha_a+90));                    %        .5
  608.          penpos5 ( thin, alpha_b);                         %   .6
  609.          penpos2 ( thick+thin, alpha_a   );                %
  610.          penpos4 ( thick+thin, alpha_b   );                %        .7
  611.          penpos3 ( thick, 1/2(alpha_a+alpha_b));
  612.          x3r:=9/10[x3,x3r];
  613.          penpos8 ( thick, 1/2(alpha_a+alpha_b));
  614.          x8l:=9/10[x8,x8l];
  615.          penpos6 ( 2/3thick, alpha_b);
  616.          penpos7 ( thin, 45);
  617.          y1l = h - 2s;
  618.          x1l =  2s;
  619.          z2r =  z1 +(nhh* right) rotated alpha_a;
  620.          z5 =  z4l+(nhh* right) rotated alpha_b;
  621.          z3  = 1/3[z2,z4];
  622.          z8  = 2/3[z2,z4];
  623.          z4  = (w,h) scaled .55;
  624.          y6r = 1.45nhh;
  625.          x6l = x4l;
  626.          x7 = 0.9w; y7= nhh-thin;
  627.          z10= z5r shifted (0.36thin,0.36thin);
  628.          currentpen:= penrazor scaled thin rotated 45;
  629.          draw z1--z2r; draw z10--z4l;
  630.          cullit; penstroke z2e..z3e..z8e..z4e; pickup pencircle scaled thin;
  631. %         cullit; penstroke z5e{nw}..z6e..z7e; cullit;
  632.          cullit; penstroke z5e..z6e..{up+4right}z7e; cullit;
  633.          penlabels(1,2,3,4,5,6,7,8,9,10);
  634. endchar;
  635. %%%%%%%%%%%%%%%%%%%
  636. %% "achtel Pause" %
  637. %%%%%%%%%%%%%%%%%%%
  638. beginchar(63, 2nhh#, 3nhh#, 0)
  639.           clear;
  640.           %punkte f"ur achtelpause, 16. und 32. Pause
  641.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  642.           x3=1/2nhh; y3=10/4nhh; 
  643.           z4-z3=(0.20nhh,0.35nhh); 
  644.           currentpen := pencircle scaled 4thinwidth;
  645.           draw z1..z2;
  646.           currentpen := pencircle scaled(2*thinwidth);
  647.           draw z2..z3{up+left};
  648.           z5=z3;
  649.           filldraw z5..z4..z5..cycle; 
  650.           penlabels (1,2,3,4,5);
  651. endchar;
  652. %%%%%%%%%%%%%%%%%%%%%%%%
  653. %% "sechzehntel Pause" %
  654. %%%%%%%%%%%%%%%%%%%%%%%%
  655. beginchar(64,2nhh#, 3nhh#, 0)
  656.           clear;
  657.           %punkte f"ur achtelpause, 16. und 32. Pause
  658.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  659.           x3=1/2nhh; y3=10/4nhh;
  660.           z4-z3=(0.20nhh,0.35nhh); 
  661. %
  662.           x5=x2; y5=y2;
  663.           y6=0; x6=x5-1/3y5;
  664.           currentpen := pencircle scaled 4thinwidth;
  665.           draw z5..z6;
  666.           currentpen := pencircle scaled(2*thinwidth);
  667.           draw z2..z3{up+left};
  668.           draw z2..z3{up+left} shifted(-1/3nhh,-nhh);
  669.           filldraw z3..z4..z3..cycle;
  670.           filldraw z3..z4..z3..cycle shifted(-1/3nhh,-nhh);
  671.           penlabels(1,2,3,4,5,6);
  672. endchar;
  673. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  674. %% "zweiunddreissigstel Pause" %
  675. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  676. beginchar(65,2nhh#, 4nhh#, 0)
  677.           clear;
  678.           %punkte f"ur achtelpause, 16. und 32. Pause
  679.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  680.           x3=1/2nhh; y3=10/4nhh;
  681.           z4-z3=(0.20nhh,0.35nhh); 
  682. %
  683.           x5=x2+1/6nhh; y5=y2+nhh;
  684.           y6=0; x6=x5-1/3y5;
  685.           currentpen := pencircle scaled 4thinwidth;
  686.           draw z5..z6;
  687.           currentpen := pencircle scaled(2*thinwidth);
  688.           draw z2..z3{up+left} shifted( 1/6nhh,nhh);
  689.           draw z2..z3{up+left} shifted(-1/6nhh, 0);
  690.           draw z2..z3{up+left} shifted(-3/6nhh,-nhh);
  691.           filldraw z3..z4..z3..cycle shifted( 1/6nhh, nhh);
  692.           filldraw z3..z4..z3..cycle shifted(-1/6nhh, 0);
  693.           filldraw z3..z4..z3..cycle shifted(-3/6nhh,-nhh);
  694. endchar;
  695. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  696. %% "vierundsechzigstel Pause" %%
  697. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  698. beginchar(66,2nhh#, 5nhh#, 0)
  699.           clear;
  700.           %punkte f"ur achtelpause, 16. und 32. Pause
  701.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  702.           x3=1/2nhh; y3=10/4nhh;
  703.           z4-z3=(0.20nhh,0.35nhh); 
  704. %
  705.           x5=x2+1/3nhh; y5=y2+2nhh;
  706.           y6=0; x6=x5-1/3y5;
  707.           currentpen := pencircle scaled 4thinwidth;
  708.           draw z5..z6;
  709.           currentpen := pencircle scaled(2*thinwidth);
  710.           draw z2..z3{up+left} shifted( 1/3nhh, 2nhh);
  711.           draw z2..z3{up+left} shifted(     0,nhh);
  712.           draw z2..z3{up+left} shifted(-1/3nhh, 0);
  713.           draw z2..z3{up+left} shifted(-2/3nhh,-nhh);
  714.           filldraw z3..z4..z3..cycle shifted( 1/3nhh, 2nhh);
  715.           filldraw z3..z4..z3..cycle shifted(   0, nhh);
  716.           filldraw z3..z4..z3..cycle shifted(-1/3nhh,0);
  717.           filldraw z3..z4..z3..cycle shifted(-2/3nhh,-nhh);
  718. endchar;
  719. %%%%%%%%%%%%%%%%%%%
  720. % ornements       %
  721. %%%%%%%%%%%%%%%%%%%
  722. beginchar (67, 2nhw#, nhh#, 0);
  723.   clear;
  724.   x1=0.2w; y1r=h; x6=w-x1; y6=h-y1;
  725.   x2r=0; y2=0.5h; x5=w-x2; y5=h-y2;
  726.   x3=0.22w; y3r=0; x4=w-x3; y4=h-y3;
  727.   pickup pencircle scaled 4thinwidth;
  728.   penpos1 (5thinwidth,90);
  729.   penpos2 (5thinwidth, 180);
  730.   penpos3 (0.2nhw, -40);
  731.   penpos4 (0.2nhw, -40);
  732.   penpos5 (5thinwidth, 180);
  733.   penpos6 (5thinwidth, 90);
  734.   penstroke (z1e..{down}z2e{down}..{right}z3e{right}..{right}z4e{right}..{down}z5e{down}..z6e)  ;
  735.   pickup pencircle scaled 2s  ;
  736.   drawdot (x1,y1r-s)  ;
  737.   drawdot (x6,y6l+s)  ;
  738.   penlabels(1,2,3,4,5,6);
  739. endchar;
  740. beginchar (68, 2nhw#, nhh#, 0);
  741.   clear;
  742.   x1=0.2w; y1r=0; x6=w-x1; y6=h-y1;
  743.   x2r=0; y2=0.5h; x5=w-x2; y5=h-y2;
  744.   x3=0.22w; y3r=h; x4=w-x3; y4=h-y3;
  745.   pickup pencircle scaled 4thinwidth;
  746.   penpos1 (5thinwidth,-90);
  747.   penpos2 (5thinwidth, -180);
  748.   penpos3 (0.2nhw, 40);
  749.   penpos4 (0.2nhw, 40);
  750.   penpos5 (5thinwidth, -180);
  751.   penpos6 (5thinwidth, -90);
  752.   penstroke (z1e..{up}z2e{up}..{right}z3e{right}..{right}z4e{right}..{up}z5e{up}..z6e);
  753.   pickup pencircle scaled 2s;
  754.   drawdot (x1,y1r+s);
  755.   drawdot (x6,y6l-s);
  756.   penlabels(1,2,3,4,5,6);
  757. endchar;
  758. %%%%%%%%%%%%%%%
  759. % appogiature %
  760. %%%%%%%%%%%%%%%
  761. beginchar(69, apog_fact*nhw#, 3.5*apog_nhh#, .50*apog_nhh#);
  762.           clear;
  763.           w:=apog_fact*nhw;
  764.           flagshape(1,0.8w, 3*apog_nhh, apog_nhh, 4thinwidth, w, 0.5apog_nhh, 1);
  765.           clear;
  766.           w:=apog_fact*nhw;
  767.           drawnoteb(w, 0.5apog_nhh, 0, 90, 20, w/2, apog_nhh/2);
  768.           clear;
  769.           pickup pencircle scaled 4thinwidth;
  770.           w:=apog_fact*nhw;
  771.           draw (w-2thinwidth,0)--(w-2thinwidth,h);
  772.           x1=-0.1w; y1=0.6apog_nhh; x2=2w; y2=y1+0.6*(x2-x1);
  773.           draw z1--z2;
  774. %
  775.          w:=apog_fact*nhw;
  776. endchar;
  777. beginchar(70, apog_fact*nhw#, 0.5apog_nhh#, 3.5*apog_nhh#);
  778.           clear;
  779.           w:=apog_fact*nhw;
  780.           flagshape(1,w, 3apog_nhh, apog_nhh, 4thinwidth, 0.2pt, apog_nhh, -1);
  781.           clear;
  782.           w:=apog_fact*nhw;
  783.           drawnoteb(w, 0.5apog_nhh, 0, 90, 20, w/2, apog_nhh/2);
  784.           pickup pencircle scaled 4thinwidth;
  785.           draw (2thinwidth,0)--(2thinwidth,-d);
  786.           clear;
  787.           w:=apog_fact*nhw;
  788.           x1=-0.3w; y1=-1.6apog_nhh; x2=1.3w; y2=y1+0.6*(x2-x1);
  789.           draw z1--z2;
  790. %
  791.           w:=apog_fact*nhw;
  792. endchar;
  793. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  794. %                                                             %
  795. %                   NOTENSCHLUESSEL                           %
  796. %                                                             %
  797. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  798. % VIOLINSCHLUESSEL %
  799. %%%%%%%%%%%%%%%%%%%%
  800. def violin(expr width, beginleft, begindown, thick, penthick) =
  801. x10=x3=x2=x8;
  802. y6l=56/15width+y12r;
  803. x11-x4=width;
  804. x5=x4+13/15width;
  805. x2=x4+31/45 width;
  806. x1=x4+7/15width;
  807. x4=beginleft;
  808. x2-x12=4/15 width;
  809. x9+2/5width=x6;
  810. x6-4/15width=x7;
  811. x9=x4+1/5width;
  812. y12r=begindown;
  813. y2r=y4=2y11;
  814. y8=y12r+4/15width;
  815. y2r=y12r+28/15width;
  816. y1=y12r+width;
  817. y3r=y12r+13/15width;
  818. y7=y12r+116/45width;
  819. y5=y12r+16/5width;
  820. y5-y10=y11;
  821. y9=y12r+2/15width;
  822. y13=y8; x13=x8-0.6s;
  823. penpos1(0,180);
  824. penpos2(thick,90);
  825. penpos3(penthick+1/16thick,-90);
  826. penpos4(5/4thick,120);
  827. penpos5(5/6thick,-120);
  828. penpos6(5/3thick,-85);
  829. penpos7(1/2thick,0);
  830. penpos8(penthick,0);
  831. penpos13(penthick,0);
  832. penpos9(5/4thick,170);
  833. penpos10(5/6thick,180);
  834. penpos11(thick,0);
  835. penpos12(penthick,-90);
  836. pickup pencircle scaled 1s;
  837. %
  838. %  penstroke z1e{2left}..z2e..z11e..z3e
  839. %  ..z4e{right+up}..z10e..{up}z5e..z6e;
  840. %  penstroke z6e{down+left}..{down}z7e--z8e;
  841. % fill z8l{2down+right}..z12l..z9l
  842. %  --z9r..z12r..{up}z8r..cycle;
  843. %  pickup pencircle scaled 1s;
  844. %  fill z9l{3/2right+up}..{right+2down}z9r..cycle;
  845. penstroke z1e{2left}..z2e..z11e..z3e
  846. ..z4e{right+up}..z10e..{up}z5e..z6e;
  847. penstroke z6e{down+left}..{down}z7e--z8e
  848. {2down+right}..z12e..{2left+up}z9e;
  849. pickup pencircle scaled 2.5s;
  850. drawdot (x9+0.4s,y9+0.8s);
  851. %
  852. penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  853. enddef;
  854. %
  855. beginchar(71,3.25nhw#, 6nhh#, 2nhh#);
  856. clear;
  857. violin(15/8nhh,1.75nhh,-1.5nhh,0.4nhh,0.111nhh);
  858. endchar;
  859.  
  860. %%%%%%%%violin-schluessel verkleinert%%%%%%%%
  861. beginchar(72,2.60nhw#, 6nhh#, 2nhh#);
  862. clear;
  863. violin(12/8nhh,1.40nhh,-1.2nhh,0.32nhh,1/10nhh);
  864. endchar;
  865.  
  866. %%%%%%%%%%%%%%%%%%%%%
  867. % BASS--SCHLUESSEL %%
  868. %%%%%%%%%%%%%%%%%%%%%
  869. % clef de fa par D. Taupin %
  870. %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  871. def bass (expr reduction) =
  872.   clear;
  873.   x2=0.80*reduction*nhw; y2=3nhh;
  874.   x1=x2r+1.25*reduction*s; y1=y2;
  875.   x3=x2+0.71*reduction*nhw; y3=y2+reduction*nhh;
  876.   x4=x3+0.71*reduction*nhw; y4=y2-0.2*reduction*nhh;
  877.   x6=x2-6*reduction*thinwidth; y6=y2-2.2*reduction*nhh;
  878.   x7=x4+0.50*reduction*nhw; x8=x7;
  879.   y7=y2+0.38*reduction*nhh; y8=y2-0.38*reduction*nhh;
  880. %
  881.   currentpen:=pencircle scaled (4*reduction*thinwidth);
  882.   penpos2(6*reduction*thinwidth,180);
  883.   penpos3(6*reduction*thinwidth, 90);
  884.   penpos4(0.5*reduction*nhh,0);
  885.   penpos6(0.1*reduction*nhh,-10);
  886.   penstroke(z2e{up}..{right}z3e{right}..{down}z4e{down}..{left+0.1down}z6e);
  887.   currentpen := pencircle scaled (0.4reduction*nhh);
  888.   pickup pencircle scaled (2*(x2r-x1));
  889.          drawdot z1;
  890.   pickup pencircle scaled 1.7s;
  891.   drawdot z7; drawdot z8;
  892.   penlabels(1,2,3,4,6);
  893. enddef;
  894. %
  895. beginchar(73, 3nhw#, 4nhh#, 0);
  896.   bass(1.0);
  897. endchar;
  898.  
  899. %%%%%%verkleinerter bass-schluessel%%%%%%%%%
  900. beginchar(74, 2.4*nhw#, 4nhh#, 0);
  901.   bass(0.8);
  902. endchar;
  903.  
  904. %%%%%%%%%%%%%%%%%%%
  905. % ALT--SCHLUESSEL %
  906. %%%%%%%%%%%%%%%%%%%
  907. def alt(expr height, beginleft, begindown, thick) =
  908. x1=x7;
  909. x2=x8;
  910. y1-y7=height;
  911. y2-y8=height;
  912. y7=begindown;
  913. x7=beginleft;
  914. x2=x1+1/4height;
  915. x6l=x8l;
  916. y5=y7+1/2height;
  917. y9=y7+1/9height;
  918. x5=x3;
  919. y4=y5+0.120height;
  920. x4-x7=height+3thinwidth;
  921. x4-x5=1/2height+3thinwidth;
  922. y3-y5=2/7height;
  923. y8=y7;
  924. y6=y7;
  925. x9=0.62x5+0.38x4;
  926. x10=x9; y10=y7+height;
  927. x11=0.5x3+0.5x6; y11=y3; penpos11(1/2thick,0);
  928. penpos8(1/4thick,180);
  929. penpos2(1/4thick,180);
  930. penpos1(thick,180);
  931. penpos7(thick,180);
  932. penpos6(thick,0);
  933. penpos5(1/10thick,0);
  934. penpos9(1/3thick,90);
  935. penpos3(1/2thick,0);
  936. penpos4(thick,180);
  937. penpos10(1/3thick,-90);
  938.  
  939. pickup pencircle scaled 1s;
  940. fill z7l--z1l--z1r--z7r--cycle;
  941. fill z8l--z2l--z2r--z8r--cycle;
  942. penstroke z5e..{left+2down}z6e;
  943. penstroke z5e{right+4down}..{right}z9e{right}..{up}z4e{up}..{left}z10e{left}..{left+4down}z11e;
  944.  
  945.  
  946. pickup pencircle scaled 1s;
  947. penstroke
  948.  (counterclockwise(z7e--z1e)reflectedabout(z7,z8));
  949. penstroke
  950. (counterclockwise(z8e--z2e)reflectedabout(z7,z8));
  951. penstroke
  952. (counterclockwise(z5e..{left+2down}z6e)reflectedabout(z7,z8));
  953. penstroke
  954. (counterclockwise (z5e{right+4down}..{right}z9e{right}..{up}z4e{up}..{left}z10e{left}..{left+4down}z11e)
  955. reflectedabout(z7,z8));
  956.  
  957. pickup pencircle scaled 2.5s;
  958. drawdot (x3+0.1nhh, y3);
  959. drawdot (x3+0.1nhh, 2y7-y3);
  960. penlabels(1,2,3,4,5,6,7,8);
  961. enddef;
  962.  
  963. %%%%%%%%%%%Altschl"usseL%%%%%%%%%%%
  964. beginchar(75,3.5nhw#, 4nhh#, 0nhh#);
  965. clear;
  966. alt(2nhh,1.25nhh,2nhh,0.4nhh);
  967. endchar;
  968.  
  969. %%%%%%%%%Verkleinerter Altschluessel%%%%%%%%%
  970. beginchar(76,2.8nhw#, 4nhh#, 0nhh#);
  971. clear;
  972. alt(1.6nhh,1.00nhh,2nhh,0.32nhh);
  973. endchar;
  974.  
  975. %%%%%%%%%Baritonschluessel%%%%%%%%%
  976. beginchar(77,3.5nhw#, 4nhh#, 0nhh#);
  977. clear;
  978. alt(2nhh,1.25nhh,4nhh,2/5nhh);
  979. endchar;
  980.  
  981. %%%%%%%%%Mezzosopranschluessel%%%%%%%%%
  982. beginchar(78,3.5nhw#, 4nhh#, 0nhh#);
  983. clear;
  984. alt(2nhh,1.25nhh,1nhh,2/5nhh);
  985. endchar;
  986.  
  987. %%%%%%%%%Sopranschluessel%%%%%%%%%
  988. beginchar(79,3.5nhw#, 4nhh#, 0nhh#);
  989. clear;
  990. alt(2nhh,1.25nhh,0nhh,2/5nhh);
  991. endchar;
  992. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  993. %                                                             %
  994. %                   SONDERZEICHEN                             %
  995. %                                                             %
  996. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  997.  
  998.  
  999.  
  1000.  
  1001. def alla_breve (expr trans) =
  1002.          thin := 5thinwidth; thick := 1/2 nhh;
  1003.          penpos1(thin, 0);
  1004.          penpos2(thin, -90);
  1005.          penpos3(thick,180);
  1006.          penpos4(thin, 90);
  1007.          penpos5(thin, 45);
  1008.          penpos6(3/4thick,45);
  1009.          2x2r = 2x4r = x1 + 2s = w;
  1010.          x3r = 0; 2y1 = 3y2 = y4r = h;
  1011.          y3r = 2/3h;
  1012.          x5 = w -2s;
  1013.          y5 = h -2s;
  1014.          z6r = z5r;
  1015.          penstroke (z1e..z2e..z3e..z4e..z5e) transformed trans;
  1016.          currentpen := pencircle scaled (2/3thick);
  1017.          drawdot z6;
  1018. enddef;
  1019.  
  1020.  
  1021. %%%%%%%%%%%%%%%
  1022. % "fermate1" %%
  1023. %%%%%%%%%%%%%%%
  1024. beginchar(80, 2nhw#, 1.25nhh#, 0);
  1025.          clear;
  1026.          penpos2(nhh/3,90);
  1027.          penpos1(nhh/8,180);
  1028.          penpos3(nhh/8,0);
  1029.          penpos4(nhh/3,90);
  1030.          y2r =1.2h;
  1031.          z1 =  origin; 2x2l = 2x4l = x3 = w; y4l = y3 = 0;
  1032.          penstroke z1e..z2e..z3e;
  1033.          currentpen:= pencircle scaled (nhh/3);
  1034.          drawdot z4;
  1035.          penlabels(1,2,3);
  1036. endchar;
  1037. %%%%%%%%%%%%%%%
  1038. % "fermate2" %%
  1039. %%%%%%%%%%%%%%%
  1040. beginchar(81, 2nhw#, 0, 1.25nhh#);
  1041.          clear;
  1042.          penpos2(nhh/3,-90);
  1043.          penpos1(nhh/8,180);
  1044.          penpos3(nhh/8,0);
  1045.          penpos4(nhh/3,90);
  1046.          y2r = -1.2d;
  1047.          z1 =  origin; 2x2l = 2x4 = x3 = w;
  1048.          y4r = y3 = 0;
  1049.          penstroke (z1e..z2e..z3e);
  1050.          currentpen := pencircle scaled (nhh/3);
  1051.          drawdot z4;
  1052.          penlabels(1,2,3);
  1053. endchar;
  1054. %%%%%%%%%%%%%%%%
  1055. % "allabreve" %%
  1056. %%%%%%%%%%%%%%%%
  1057. beginchar(82, 2nhh#, 3nhh#, 0);
  1058.          clear;
  1059.          alla_breve(identity);
  1060.          z7 = z4 + 2/16 h *up;
  1061.          z8 = z2 + 2/16 h *down;
  1062.          currentpen := pencircle scaled (thin);
  1063.          draw z7--z8;
  1064.          penlabels(1,2,3,4,5,6,7,8);
  1065. endchar;
  1066. %%%%%%%%
  1067. % "C" %%
  1068. %%%%%%%%
  1069. beginchar(83, 2nhh#, 3nhh#, 0);
  1070.          clear;
  1071.          alla_breve(identity);
  1072. endchar;
  1073. %%%%%%%%%%%%%%%
  1074. % "reverseC" %%
  1075. %%%%%%%%%%%%%%%
  1076. beginchar(84, 2nhh#, 3nhh#, 0);
  1077.          clear;
  1078.          transform T;
  1079.     xxpart T = -yypart T; xypart T = yxpart T; % T is a reflection
  1080.     (w/2,0) transformed T = (w/2,0);  (w/2,1) transformed T = (w/2,1);
  1081.          thin := 5thinwidth; thick := 1/2 nhh;
  1082.          penpos1(thin, 0);
  1083.          penpos2(thin, -90);
  1084.          penpos3(thick,180);
  1085.          penpos4(thin, 90);
  1086.          penpos5(thin, 45);
  1087.          penpos6(3/4thick,45);
  1088.          2x2r = 2x4r = x1 + 2s = w;
  1089.          x3r = 0; 2y1 = 3y2 = y4r = h;
  1090.          y3r = 2/3h;
  1091.          x5 = w -2s;
  1092.          y5 = h -2s;
  1093.          z6r = z5r;
  1094.          penstroke (counterclockwise
  1095.          (z1e..z2e..z3e..z4e..z5e) transformed T);
  1096.          currentpen := pencircle scaled (2/3thick);
  1097.          drawdot (z6 transformed T);
  1098. endchar;
  1099. %%%%%%%%%%%%%%%%%%
  1100. % repeat symbols %
  1101. %%%%%%%%%%%%%%%%%%
  1102. beginchar(85, 2nhw#, 3nhh#, 0);
  1103.   clear;
  1104.   x1=0.5w; y1=0.5h;
  1105.   x2=0.5nhh; y2=y1;
  1106.   x3=x1; y3=y1+nhh;
  1107.   x4=2x1-x2; y4=2y1-y2;
  1108.   x5=2x1-x3; y5=2y1-y3;
  1109.   pickup pensquare xscaled thinwidth yscaled 4thinwidth;
  1110.   draw (0,y1)--(w,y1);
  1111.   pickup pensquare xscaled 4thinwidth yscaled thinwidth;
  1112.   draw (x1,0)--(x1,h);
  1113.   pickup pencircle xscaled 12thinwidth yscaled 4thinwidth;
  1114.   draw z2..z3..z4..z5..cycle;
  1115. endchar;
  1116. beginchar(86, 3nhw#, 3nhw#, 0);
  1117.   clear;
  1118.   x1=0.5w; y1=0.5h;
  1119.   x2=x1-0.1w; y2=y1+0.4h;
  1120.   x3=2x1-x2; y3=2y1-y2;
  1121.   x4=x1-0.3h; y4=y1-0.1h;
  1122.   x5=2x1-x4; y5=2y1-y4;
  1123.   x6=x1+0.25w; y6=y1+0.4h;
  1124.   x7=2x1-x6; y7=2y1-y6;
  1125.   pickup pencircle scaled 1.6s;
  1126.   drawdot z2; drawdot z3;
  1127.   pickup pencircle scaled s;
  1128.   drawdot z4; drawdot z5;
  1129.   z8l=z2+(0,0.8s); z9=2z1-z8;
  1130.   penpos1 (1.8s,25);
  1131.   penpos10 (1.8s,25);
  1132.   penpos11 (1.8s,25);
  1133.   penpos8 (0.5s,-90); 
  1134.   penpos9 (0.5s,-90); 
  1135.   z10=z1+(-s,s); z11=2z1-z10;
  1136.   penstroke (z8e{left}..{right+down}z10e..z11e{right+down}..{left}z9e);
  1137.   pickup penrazor scaled 0.8s;
  1138.   draw z6--z7;
  1139. %
  1140.   penlabels (1,2,3,4,5,6,7,8,9);
  1141. endchar;
  1142. %%%%%%%%%%%%%%%
  1143. %   " pince"  %
  1144. %%%%%%%%%%%%%%%
  1145. def pince =
  1146.          clear;
  1147.          x1-x3=x3-x5; y1=y3;
  1148.          x2=1/8w; y2=8/10h;
  1149.          x3=0.5w-x2; y3=h-y2;
  1150.          x4=0.5w+x2; y4=y2;
  1151.          x5=0.5w+x3; y5=y3;
  1152.          x6=w-x1; y6=h-y1;
  1153.          pickup pensquare xscaled 0.40nhh yscaled 0.1nhh rotated 52;
  1154.          draw (z1--z2--z3--z4--z5--z6);
  1155. enddef;
  1156. %
  1157. beginchar(87, 1.2nhw#, 0.8nhh#, 0);
  1158.   pince;
  1159. endchar;
  1160. %
  1161. beginchar(88, 1.8nhw#, 0.8nhh#, 0);
  1162.   w:=2w/3;
  1163.   pince;
  1164.   draw (z4--z5--z6) shifted (z4-z2);
  1165.   w:=1.8nhw;
  1166. endchar;
  1167. %%%%%%%%%%%%%%%
  1168. %  "mordant"  %
  1169. %%%%%%%%%%%%%%%
  1170. beginchar(89, 1.2nhw#, 0.8nhh#, 0);
  1171.   pince;
  1172.   pickup pencircle scaled (4thinwidth);
  1173.   draw (0.5w,-0.4h)--(0.5w,1.4h);
  1174. endchar;
  1175. %%%%%%%%%%%%%%%
  1176. %  arpeggio  %%
  1177. %%%%%%%%%%%%%%%
  1178. def arpegel =
  1179.          clear;
  1180.          y1=0; x1=0.5w;
  1181.          y2=0.3nhh; x2=8/10w;
  1182.          y3=nhh-y2; x3=w-x2;
  1183.          y4=nhh; x4=0.5w;
  1184.          pickup pencircle xscaled 0.40nhh yscaled 0.1nhh rotated 45;
  1185.          draw (z1..z2..z3..z4);
  1186. enddef;
  1187. %
  1188. beginchar(90, 0.4nhw#, nhh#, 0);
  1189.   arpegel;
  1190. endchar;
  1191. for jj=1 upto 9:
  1192.   beginchar(90+jj, 0.4nhw#, (1+jj)*nhh#, 0);
  1193.   arpegel;
  1194.   for kk=1 upto jj:
  1195.          draw (z1..z2..z3..z4) shifted (0,kk*nhh);
  1196.   endfor;
  1197. endchar;
  1198. endfor;
  1199. %%%%%%%%%%%%%%%
  1200. %  "trille"  %%
  1201. %%%%%%%%%%%%%%%
  1202. def arp_elem =
  1203.          clear;
  1204.          x1=0; y1=0.5h;
  1205.          x2=1/3nhw; y2=8/10h;
  1206.          x3=nhw-x2; y3=h-y2;
  1207.          x4=nhw; y4=0.5h;
  1208.          pickup pencircle xscaled 0.33nhh yscaled 0.1nhh rotated 45;
  1209.          draw (z1..z2..z3..z4);
  1210. enddef;
  1211. %
  1212. beginchar(100, nhw#, 0.45nhh#, 0);
  1213.   arp_elem;
  1214. endchar;
  1215. %
  1216. for jj=1 upto 9:
  1217.   beginchar(100+jj, (jj+1)*nhw#, 0.45nhh#, 0);
  1218.     arp_elem;
  1219.     for kk=1 upto jj:
  1220.          draw (z1..z2..z3..z4) shifted (kk*nhw,0);
  1221.     endfor;
  1222.   endchar;
  1223. endfor;
  1224. %
  1225. % general parameters for small flags
  1226. %
  1227.     flagw:=0.8*nhw*apog_fact;
  1228.     flagthick:=nhh*apog_fact;
  1229.     flagthin:=5thinwidth*apog_fact;
  1230. %%%%%%%%%%%%%%%%%%%%%%%
  1231. %% "8flag nach unten" %
  1232. %%%%%%%%%%%%%%%%%%%%%%%
  1233. flagw:=0.8*nhw*apog_fact;
  1234. beginchar(110, 0, 3apog_nhh#, 0);
  1235.      clear;
  1236.      cflag(1);
  1237.      w:=0;
  1238. endchar;
  1239.  
  1240. %%%%%%%%%%%%%%%%%%%%%%%%
  1241. %% "16flag nach unten" %
  1242. %%%%%%%%%%%%%%%%%%%%%%%%
  1243.  
  1244. beginchar(111, 0, 3.25apog_nhh#, 0);
  1245.      clear;
  1246.      ccflag(1);
  1247.      w:=0;
  1248. endchar;
  1249.  
  1250. %%%%%%%%%%%%%%%%%%%%%%%%
  1251. %% "32flag nach unten" %
  1252. %%%%%%%%%%%%%%%%%%%%%%%%
  1253.  
  1254. beginchar(112, 0, 4.00apog_nhh#, 0);
  1255.      clear;
  1256.      cccflag(1);
  1257.      w:=0;
  1258. endchar;
  1259.  
  1260. %%%%%%%%%%%%%%%%%%%%%%%%
  1261. %% "64flag nach unten" %
  1262. %%%%%%%%%%%%%%%%%%%%%%%%
  1263.  
  1264. beginchar(113, 0, 4.75apog_nhh#, 0);
  1265.      clear;
  1266.      ccccflag(1);
  1267.      w:=0;
  1268. endchar;
  1269.  
  1270. %%%%%%%%%%%%%%%%%%%%%%%%%
  1271. %% "128flag nach unten" %
  1272. %%%%%%%%%%%%%%%%%%%%%%%%%
  1273.  
  1274. beginchar(114, 0, 5.50apog_nhh#, 0);
  1275.      clear;
  1276.      cccccflag(1);
  1277.      w:=0;
  1278. endchar;
  1279.  
  1280. %%%%%%%%%%%%%%%%%%%%%%
  1281. %% "8flag nach oben" %
  1282. %%%%%%%%%%%%%%%%%%%%%%
  1283. flagw:=1.0*nhw*apog_fact;
  1284. beginchar(115, 0, 3apog_nhh#, 0);
  1285.      clear;
  1286.      cflag(-1);
  1287.      w:=0;
  1288. endchar;
  1289.  
  1290. %%%%%%%%%%%%%%%%%%%%%%%
  1291. %% "16flag nach oben" %
  1292. %%%%%%%%%%%%%%%%%%%%%%%
  1293.  
  1294. beginchar(116, 0, 3.25apog_nhh#, 0);
  1295.      clear;
  1296.      ccflag(-1);
  1297.      w:=0;
  1298. endchar;
  1299.  
  1300. %%%%%%%%%%%%%%%%%%%%%%%
  1301. %% "32flag nach oben" %
  1302. %%%%%%%%%%%%%%%%%%%%%%%
  1303.  
  1304. beginchar(117, 0, 4.00apog_nhh#, 0);
  1305.      clear;
  1306.      cccflag(-1);
  1307.      w := 0;
  1308. endchar;
  1309.  
  1310. %%%%%%%%%%%%%%%%%%%%%%%
  1311. %% "64flag nach oben" %
  1312. %%%%%%%%%%%%%%%%%%%%%%%
  1313.  
  1314. beginchar(118, 0, 4.75apog_nhh#, 0);
  1315.      clear;
  1316.      ccccflag(-1);
  1317.      w := 0;
  1318. endchar;
  1319.  
  1320. %%%%%%%%%%%%%%%%%%%%%%%%
  1321. %% "128flag nach oben" %
  1322. %%%%%%%%%%%%%%%%%%%%%%%%
  1323.  
  1324. beginchar(119, 0, 5.50apog_nhh#, 0);
  1325.      clear;
  1326.      cccccflag(-1);
  1327.      w := 0;
  1328. endchar;
  1329. %%%%%%%%%%%%%%%%%%%%%%%
  1330. % kleine versetzungen %
  1331. %%%%%%%%%%%%%%%%%%%%%%%
  1332. beginchar(120, apog_fact*nhw#, 2apog_fact*nhh#, 2apog_fact*nhh#);
  1333.  flat (apog_fact, 0, 1);
  1334. endchar;
  1335. beginchar(121,1.7*apog_fact*nhw#, 2*apog_fact*nhh#, 2*apog_fact*nhh#);
  1336.          flat (apog_fact, 0, 1);cullit; clear;
  1337.          flat (apog_fact, 0.7*apog_fact*nhw, 1);
  1338. endchar;
  1339. beginchar(122, 0.8apog_fact*nhw#, 1.5apog_fact*nhh#, 1.5apog_fact*nhh#);
  1340.   sharp(apog_fact);
  1341. endchar;
  1342. beginchar(123, apog_fact*nhw#, .5nhw#, .5nhw#);
  1343.          clear;
  1344.          z1 = (0.150w, h-0.150w); z2 = (w-0.150w, h-0.150w);
  1345.          z3 = (0.150w,-h+0.150w); z4 = (w-0.150w,-h+0.150w);
  1346.          pwidth:=0.2*apog_fact*nhh;
  1347.          currentpen:= pencircle scaled pwidth;
  1348.          draw z1--z4; draw z3--z2;
  1349.          currentpen:= pensquare scaled .30w;
  1350.          drawdot z1; drawdot z2; drawdot z3; drawdot z4;
  1351. endchar;
  1352. beginchar(124, 0.8apog_fact*nhw#, 1.5apog_fact*nhh#, 1.5apog_fact*nhh#);
  1353.   natural;
  1354. endchar;
  1355. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1356. % volle Note mit | -->  |O| %
  1357. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1358. beginchar(125,1.5nhh#, .5nhh#, .5nhh#);
  1359.           drawnoteb(w, h, 0, 85, 0, nhh/3, 3*thinwidth);
  1360.           pickup pensquare scaled 0.2w;
  1361.           draw (-0.05w,-0.4nhh)--(-0.05w,0.4nhh);
  1362.           draw (1.05w,-0.4nhh)--(1.05w,0.4nhh);
  1363. endchar;
  1364. %%%%%%%%%%%%%%%%%
  1365. % repeat colons %
  1366. %%%%%%%%%%%%%%%%%
  1367. beginchar(126,0.6nhh#, 4nhh#, 0);
  1368.    pickup pencircle scaled 0.3nhh;
  1369.    drawdot (0.3nhh, 1.5nhh);
  1370.    drawdot (0.3nhh, 2.5nhh);
  1371. endchar;
  1372.  
  1373.